import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import VChart from 'vue-echarts'
import * as echarts from 'echarts'

import App from './App.vue'
import router from './router'
import { registerXssDirectives } from './directives/xss-safe'

const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(ElementPlus)
app.component('v-chart', VChart)

// 注册XSS防护指令
registerXssDirectives(app)
// echarts.registerTheme('macarons', { /* your theme object */ })
app.config.globalProperties.$echarts = echarts

app.mount('#app')
